﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RewardsRedeem.aspx.cs" Inherits="FYPHP.RewardsRedeem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript"> var num = 0; </script>
   <asp:Repeater ID="ItemList" runat="server" EnableViewState="False" 
        onitemcommand="ItemList_ItemCommand">
<HeaderTemplate>
<h2>Reward Redemption</h2>
<table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
 <tr style="background-color: #eee; font-weight: bold;"><td width="20px">No.</td><td width="25">Image</td><td>Reward</td><td width="150">Username</td><td width="150">Actions</td></tr>

</HeaderTemplate>

<ItemTemplate>
     <tr>
            <td><script type="text/javascript">  num += 1; document.write(num);</script></td>
            <td align="center">
            <img src="\uploads\reward\<%#DataBinder.Eval(Container.DataItem, "r_picture" ) %>" alt="" height="25px" width="25px" />
            </td>
            <td style="text-align: center"><a href="/RewardDetails.aspx?id=<%#DataBinder.Eval(Container.DataItem, "p_id" ) %>" target="_blank"><%#DataBinder.Eval(Container.DataItem, "r_name" ) %></a></td>
            <td style="text-align: center"><%#DataBinder.Eval(Container.DataItem, "username" ) %></td>
            <td>
        <asp:Button ID="btnEdit" runat="server" Text="View" CommandName="View" 
        CommandArgument='<%# Eval("t_id").ToString() %>' />
        <asp:Button ID="Button2" runat="server" Text="Complete" CommandName="Complete" 
        CommandArgument='<%# Eval("t_id").ToString() %>' /></td>
        </tr>
       
   </ItemTemplate>

   <FooterTemplate>
   
    </table>
    </FooterTemplate>
</asp:Repeater>
</asp:Content>
